import request from '@/utils/request'

// 查询员工入职时间记录列表
export function listRecord(query) {
  return request({
    url: '/manage/record/list',
    method: 'get',
    params: query
  })
}

/**查询任职人数 */
export function countRecord(query) {
  return request({
    url: '/manage/record/count',
    method: 'get',
    params: query
  })
}

/**查询任职人数 */
export function countDef(query) {
  return request({
    url: '/manage/record/countDef',
    method: 'get',
    params: query
  })
}

// 查询员工入职时间记录详细
export function getRecord(userId) {
  return request({
    url: '/manage/record/' + userId,
    method: 'get'
  })
}

// 新增员工入职时间记录
export function addRecord(data) {
  return request({
    url: '/manage/record',
    method: 'post',
    data: data
  })
}

// 修改员工入职时间记录
export function updateRecord(data) {
  return request({
    url: '/manage/record',
    method: 'put',
    data: data
  })
}

// 删除员工入职时间记录
export function delRecord(userId) {
  return request({
    url: '/manage/record/' + userId,
    method: 'delete'
  })
}
